Drupal 6: pre-defined variable for amount [count] of custom type items...

Posted by artmania on Stack Overflow See other posts from Stack Overflow or by artmania
Published on 2010-06-03T15:30:40Z Indexed on 2010/06/03 15:34 UTC
Read the original article Hit count: 215

Filed under:
|
|
|

Hi friends,

I'm a drupal newbie...

I researched but couldnot find :/ is there any predefined variable that gives my CCK field value count?

for example; I have field_logo_sponsor and I need to display all logo items. Now I have 5 item

<?php print $node->field_logo_sponsor[0]['view'] ?>
<?php print $node->field_logo_sponsor[1]['view'] ?>
<?php print $node->field_logo_sponsor[2]['view'] ?>
<?php print $node->field_logo_sponsor[3]['view'] ?>
<?php print $node->field_logo_sponsor[4]['view'] ?>

it is stupid to use it that way :/ if there is any count variable for that, I will just create a loop for that and display them in a for or while loop

Appreciate helps! thanks a lot!

© Stack Overflow or respective owner

Related posts about drupal

Related posts about variables